/**
 * 面试题 16.08. 整数的英语表示
 * https://leetcode-cn.com/problems/english-int-lcci/
 */
public class Solutions_mianshi_16_08 {
    public static void main(String[] args) {
//        int num = 123;  // output: "One Hundred Twenty Three"
//        int num = 12345;  // output: "Twelve Thousand Three Hundred Forty Five"
//        int num = 1234567;  // output: "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"
//        int num = 1234567891;  // output: "One Billion Two Hundred Thirty Four Million Five Hundred
                                    // Sixty Seven Thousand Eight Hundred Ninety One"
        int num = Integer.MAX_VALUE;  // output: "Two Billion One Hundred Forty Seven Million Four Hundred
                                            // Eighty Three Thousand Six Hundred Forty Seven"  2147483647

        String result = numberToWords(num);
        System.out.println(result);
    }

    public static String numberToWords(int num) {
        return Solutions_273.numberToWords(num);
    }
}
